package com.sphd.restaurantsystem.adapters;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.restaurantsystem.R;
import com.sphd.restaurantsystem.info.GoodInOrOutInfo;
import com.wzh.frame.utils.TimeUtils;

import java.util.List;

/**
 * Created by Hu on 2016/12/26.
 */

public class GoodInAdapter extends BaseQuickAdapter<GoodInOrOutInfo> {
    public GoodInAdapter(int layoutResId, List<GoodInOrOutInfo> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, GoodInOrOutInfo goodInOrOutInfo) {

     /*因公共布局 固此设置名字显示时间 */
        baseViewHolder.setText(R.id.i_record_name, TimeUtils.getTime(goodInOrOutInfo.getInventory_regtime(),TimeUtils.DEFAULT_DATE_FORMAT))
                .setText(R.id.i_record_no, String.valueOf(goodInOrOutInfo.getInventory_number()));

    }
}
